using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace zombie_spel
{
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;
        Level level = new Level();

        Player player;

        List<Entity> entities = new List<Entity>();

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferHeight = 900;
            graphics.PreferredBackBufferWidth = 1600;
            graphics.IsFullScreen = true;
            Content.RootDirectory = "Content";
        }
        protected override void Initialize()
        {
            
            base.Initialize();
        }
        protected override void LoadContent()
        {
            Texture2D grass = Content.Load<Texture2D>("GameThumbNail");
            Texture2D playerTexture = Content.Load<Texture2D>("Texture");
            level.AddTexture(grass);
            spriteBatch = new SpriteBatch(GraphicsDevice);
            player = new Player(player.Texture, player.Position);
        }
        protected override void UnloadContent()
        {
            
        }
        protected override void Update(GameTime gameTime)
        {

            base.Update(gameTime);
        }
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);
            spriteBatch.Begin();
            level.Draw(spriteBatch);
            spriteBatch.Draw(player.Texture, player.Position, Color.Black);
            spriteBatch.End();
            base.Draw(gameTime);
        }
    }
}